package com.xinda.admin.service;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.xinda.admin.dao.MemberMapper;
import com.xinda.admin.pojo.Member;
import com.xinda.admin.pojo.Region;
import com.xinda.admin.vo.OrderEditVo;

@Controller
public class MemberService {
	@Resource
	private MemberMapper memberMapper;
	/*已停用客户*/
	public List<Member> selectStatusMember1(){
	
		return memberMapper.selectStatusMembers();		
	}
	/*用户登录记录*/
	public List<Member> selectRecordmember2(){
		
		return memberMapper.selectRecordMembers();		
	}

	/*删除用户*/
	public void deletememberById(Integer id){
		
		memberMapper.deletememberById(id);		
	}
	/*批量删除用户*/
	public void deletemembersById(String[] id) {

		memberMapper.deletemembersById(id);		
	}
	/*添加新用户*/
	public void insertMember(Member member) {

		memberMapper.insertMember(member);		
	}
	/*停用*/
	public void stopMmeber(int id) {

		memberMapper.stopMember(id);		
	}
	/*启用*/
	public void startMember(int id) {

		memberMapper.startMember(id);		
	}
	/*
	 * 
	 * 查询所有用户*/
	public List<Member> selectAllmember(Map<String, String> conditionsMap) {

		return memberMapper.selectAllMember(conditionsMap);		
	}
	/*
	 * 
	 * 查询用户数量*/
	public Integer countMember() {

		return memberMapper.countMember();
	}
	/*查询所有用户*/
	public List<Member> selectAllMember(Map<String, String> conditionsMap) {
		
		return memberMapper.selectAllMember(conditionsMap);
	}
	/*用户资料查询*/
	public Member selectmemberShow(int id) {
		
		return memberMapper.selectmemberShow(id);
	}
	/*
	 * 用户详情*/
	public List<OrderEditVo> OrderMember(int id) {
		
		return memberMapper.selectOrderMember(id);
	}
	/*地区*/
	public List<Region> queryRegion(int parent_id){
		
		return memberMapper.memberprovince(parent_id);		
	}
}